Skip to content

feat(tron-wallet-snap): remove assets migration feature-flag routing - #97

Draft
ulissesferreira wants to merge 2 commits into
WPN-1497-core-adapter-routingfrom
WPN-1497-remove-assets-migration-flag
Draft

feat(tron-wallet-snap): remove assets migration feature-flag routing#97
ulissesferreira wants to merge 2 commits into
WPN-1497-core-adapter-routingfrom
WPN-1497-remove-assets-migration-flag

Conversation

@ulissesferreira

Copy link
Copy Markdown
Contributor

Summary

  • Remove SnapsAssetsMigrationStage / remote feature-flag resolution from AssetsService and SnapAssetsAdapter
  • Always route fungible reads (getAccountAssetByID, getAccountAssetsByIDs, getAccountAssetsByScope) through Core AssetsController via AssetsProvider
  • Keep snap-owned protocol assets (energy, bandwidth, staking, lock/withdrawal, rewards) on the Snap adapter for sync, reads, and keyring events
  • Drop RemoteFeatureFlagController:getState messenger endowment and @metamask/remote-feature-flag-controller devDependency

PR chain

#90#91#92#95#96this PR

Test plan

  • yarn workspace @metamask/tron-wallet-snap run jest --no-coverage src/services/assets/AssetsService.test.ts
  • CI green (manifest shasum may need Linux CI value)

@ulissesferreira
ulissesferreira requested review from a team as code owners August 2, 2026 23:53
@ulissesferreira
ulissesferreira marked this pull request as draft August 3, 2026 09:19
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-core-adapter-routing branch from 1a63feb to 3dc547d Compare August 4, 2026 13:45
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-remove-assets-migration-flag branch from 00b11e7 to 313552f Compare August 4, 2026 13:45
ulissesferreira and others added 2 commits August 4, 2026 14:53
After rollout, always route fungible reads through AssetsController via
AssetsProvider. Snap-owned protocol assets remain on the Snap adapter.
Remove RemoteFeatureFlagController endowment and migration stage logic.
…sProvider routing

- Slim SnapAssetsAdapter to snap-owned fetch/save/read only (fetchSnapOwnedAssetsForAccount)
- Move handler logic (metadata, conversions, market data, historical prices) into AssetsService
- Add syncSnapOwnedAssets for cron sync; AccountsService.synchronizeAssets delegates to it
- Keep PR97 fungible read routing via AssetsProvider for getAccountAssetByID/ByIDs/ByScope
- Remove public saveMany, getAll, fetchAssetsAndBalancesForAccount, hasChanged from AssetsService
- Drop unused state from AssetsService constructor in context.ts
- Port and adapt unit tests; update eslint suppressions and changelog

Co-authored-by: Ulisses Ferreira <ulisses@hey.com>
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-remove-assets-migration-flag branch from 313552f to 03454c3 Compare August 4, 2026 13:54
@ulissesferreira
ulissesferreira force-pushed the WPN-1497-core-adapter-routing branch from 3dc547d to d387059 Compare August 4, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants